package com.jeesite.modules.config;

import com.sy.demo.service.LingGongDaoApi;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class LingGongDaoConfig {

    @Value("${linggongdao.appId}")
    private String appId;

    @Value("${linggongdao.comId}")
    private String comId;

    @Value("${linggongdao.aesKey}")
    private String aesKey;

    @Value("${linggongdao.publicKey}")
    private String appPublicKey;

    @Value("${linggongdao.privateKey}")
    private String appPrivateKey;

    @Value("${linggongdao.baseUrl}")
    private String baseUrl;

    @Value("${linggongdao.payPass}")
    private String payPass;

    @Bean
    public LingGongDaoApi getLingGongDaoApi() {
        LingGongDaoApi lingGongDaoApi = new LingGongDaoApi();
        lingGongDaoApi.setAppid(appId);
        lingGongDaoApi.setPayPass(payPass);
        lingGongDaoApi.setAesKey(aesKey);
        lingGongDaoApi.setAppPublicKey(appPublicKey);
        lingGongDaoApi.setAppPrivateKey(appPrivateKey);
        lingGongDaoApi.setComId(comId);
        lingGongDaoApi.setBaseUrl(baseUrl);
        return lingGongDaoApi;
    }
}
